package com.yilong.wei.app.service.impl;

import com.yilong.wei.app.dao.CountryMapper;
import com.yilong.wei.app.domain.Country;
import com.yilong.wei.app.service.CountryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CountryServiceImpl implements CountryService {

    private static final Logger logger = LoggerFactory.getLogger(CountryServiceImpl.class);

    @Autowired
    private CountryMapper countryMapper;

    @Override
    public Country selectByPrimaryKey(String id) {
        Country country = countryMapper.selectByPrimaryKey(id);
        return country;
    }

    @Override
    public List<Country> findAll() {
        return countryMapper.findAll();
    }

    @Override
    public int updateByPrimaryKey(Country country) {
        return countryMapper.updateByPrimaryKey(country);
    }

    @Override
    public int insert(Country country) {
        return countryMapper.insert(country);
    }

    @Override
    public int updateStatusByPrimaryKey(String code) {
        return countryMapper.updateStatusByPrimaryKey(code);
    }
}
